USE [NGroup_VTL_DB]
GO

/****** Object:  StoredProcedure [dbo].[AddNewGenericType]    Script Date: 5/30/2015 2:32:24 PM ******/
DROP PROCEDURE [dbo].[AddNewGenericType]
GO

/****** Object:  StoredProcedure [dbo].[AddNewGenericType]    Script Date: 5/30/2015 2:32:24 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[AddNewGenericType]
	@Descriptions			NVARCHAR(500),
	@Descriptions_En		NVARCHAR(500),
	@UniqueString			NVARCHAR(100),
	@SupTypeID				INT = NULL,
	@CanEdit				BIT,
	@IsActive				BIT,
	@CreatedAt				DATETIME,
	@CreatedBy				NVARCHAR(50),
	@MetaDescriptions		NVARCHAR(1500),
	@MetaDescriptions_En	NVARCHAR(1500),
	@MetaKeywords			NVARCHAR(1500),
	@MetaKeywords_En		NVARCHAR(1500),
	@NewIdentity		INT = NULL OUTPUT

AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	INSERT INTO [NGroup_VTL_DB].[dbo].[GenericTypes]
           ([Descriptions]
		   ,[Descriptions_En]
           ,[UniqueString]
           ,[SupTypeID]
           ,[CreatedAt]
           ,[CreatedBy]
           ,[IsActive]
           ,[CanEdit]
		   ,[MetaKeyword]
		   ,[MetaKeyword_En]
		   ,[MetaDescription]
		   ,[MetaDescription_En])
     VALUES
           (@Descriptions
		   ,@Descriptions_En
           ,@UniqueString
           ,@SupTypeID
           ,@CreatedAt
           ,@CreatedBy
           ,@IsActive
           ,@CanEdit
		   ,@MetaKeywords
		   ,@MetaKeywords_En
		   ,@MetaDescriptions
		   ,@MetaDescriptions_En)
    SELECT @NewIdentity = @@IDENTITY
END


GO


